<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = ["1", "23", "324234", "4333"]
        let arr1 = arr.filter(a => a.length <= 2)
        console.log(arr1)
        let arr2 = arr.find(a => a.length < 2)
        console.log(arr2)
        console.log(arr.map(a => {
            return "a" + a
        }))
        arr.slice(2, 1, "312")
        console.log(arr)
        arr.slice(2)
        console.log(arr)
        let arr3 = ["宇宙", "无敌", "暴龙战士"]
        console.log(arr3.reduce((p, c) => {
            return p + c
        }), "66")
        for (let i = 0; i < arr3.length; i++) {
            console.log(arr3[i])
        }
        for (item of arr3) {
            console.log(item)
        }
        for (index in arr3) {
            console.log(arr3[index])
        }
    </script>
</body>

</html>